package FenxiaoService

import (
	"context"
	"errors"
	"gdshop-back-end-go/common/entity"
)

func GetFenxiaoUserModelByFenxiaoUserId(ctx context.Context, fenxiaoUserId int) (*entity.FenxiaoUser, error) {
	fuList, err := GetFenxiaoUserListByCache(ctx)
	if err != nil {
		return nil, err
	}

	for _, item := range fuList {
		if item.Id == fenxiaoUserId {
			return item, nil
		}
	}
	return nil, errors.New("没有找到数据")
}
